package com.spring.application;

import com.java.bean.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringIOCConfApp_02 {

    @Test
    public void getBeanContext() {
        ApplicationContext context = new ClassPathXmlApplicationContext("springIOC-conf-02.xml");
    }

    @Test
    public void getBeanProtype(){
        ApplicationContext context = new ClassPathXmlApplicationContext("springIOC-conf-02.xml");
        Person person01 = context.getBean("person01", Person.class);
        Person person02 = context.getBean("person01", Person.class);
        System.out.println(person01 == person02);
    }
}
